import request from '@/utils/request';

// 查询虚拟购买记录
export function virtuallyLogList(data) {
  return request({
    url: '/system/virtually/log/list',
    method: 'post',
    data
  })
}

// 添加虚拟购买记录
export function addVirtuallyLog(data) {
  return request({
    url: '/system/virtually/log',
    method: 'post',
    data
  })
}

// 修改虚拟购买记录
export function updateVirtuallyLog(data) {
  return request({
    url: '/system/virtually/log',
    method: 'put',
    data
  })
}

// 删除虚拟购买记录
export function delVirtuallyLog(data) {
  return request({
    url: '/system/virtually/log/batchDelete',
    method: 'post',
    data
  })
}

// 产品类型列表
export function virtuallyProductTypeList(params) {
  return request({
    url: '/system/virtually/log/productTypeNameList',
    method: 'get',
    params
  })
}

// 产品列表
export function virtuallyProductList(type, id) {
  return request({
    url: `/system/virtually/log/productNameList/${type}/${id}`,
    method: 'get',
  })
}

// 虚拟用户列表
export function virtuallyUserList(params) {
  return request({
    url: '/system/virtually/log/virtuallyUserList',
    method: 'get',
    params
  })
}

// 导出
export function virtuallyExport(data) {
  return request({
    url: '/system/virtually/log/export',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

// 统计
export function virtuallyStatistics(data) {
  return request({
    url: '/system/virtually/log/statistics',
    method: 'post',
    data
  })
}